package com.onetoall.yjt;

import android.app.Activity;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.LinearLayout;
import android.widget.TextView;

/**
 * Created by DELL on 2016/12/28.
 */

public class TableActivity extends Activity {
    private   final String[] weekString ={"","会议室2","会议室3","会议室4","会议室5","会议室6","会议室7","会议室8","会议室9","会议室10","会议室11","会议室12","会议室14","会议室13","会议室15"};
    private HorizontalListView hvWeek;
    private RecyclerView rv;
    private LinearLayout linearLayout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        setContentView(R.layout.layout_table_activity);
//        hvWeek = (HorizontalListView) findViewById(R.id.hl_week);
//        hvWeek.setAdapter(new WeekAdapter());
//        MyView myView = new MyView(this);
//        linearLayout = (LinearLayout) findViewById(R.id.ll);
//        linearLayout.addView(myView);
            setContentView(new MyView(this));
    }

  class  WeekAdapter extends BaseAdapter{
        public  final String[] weekString = {"周日","周一","周二","周三","周四","周五","周六"};
      @Override
      public int getCount() {
          return 7;
      }

      @Override
      public Object getItem(int position) {
          return weekString[position];
      }

      @Override
      public long getItemId(int position) {
          return position;
      }

      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          convertView = LayoutInflater.from(TableActivity.this).inflate(R.layout.gv_calcalar_item,null);
          TextView tvWeet  = (TextView) convertView.findViewById(R.id.tv_week);
          tvWeet.setText(weekString[position]);
          return convertView;
      }
  }


}
